import React from 'react';
import { Route, routerRedux, Switch } from 'dva/router';
import { getRouterData } from './common/router';

const { ConnectedRouter } = routerRedux;

function RouterConfig({ history, app }) {
  const routerData = getRouterData(app);

  const BasicLayout = routerData['/'].component;
  return (

      <ConnectedRouter history={history}>
        <Switch>
          <Route path="/" component={BasicLayout} />
        </Switch>
      </ConnectedRouter>

  );
}

export default RouterConfig;
